//
//  GHTalkList.m
//  guahao
//
//  Created by osx on 16/10/23.
//  Copyright © 2016年 osx. All rights reserved.
//

#import "GHTalkList.h"
#import "GHTalkWithDoctor.h"

@interface GHTalkList ()<RCIMUserInfoDataSource>

@end

@implementation GHTalkList

- (void)viewDidLoad {
    //重写显示相关的接口，必须先调用super，否则会屏蔽SDK默认的处理
    [super viewDidLoad];
    
    //设置需要显示哪些类型的会话
    [self setDisplayConversationTypes:@[@(ConversationType_PRIVATE),
                                        @(ConversationType_DISCUSSION),
                                        @(ConversationType_CHATROOM),
                                        @(ConversationType_GROUP),
                                        @(ConversationType_APPSERVICE),
                                        @(ConversationType_SYSTEM)]];
    //设置需要将哪些类型的会话在会话列表中聚合显示
    [self setCollectionConversationType:@[@(ConversationType_DISCUSSION),
                                          @(ConversationType_GROUP)]];
}
//重写RCConversationListViewController的onSelectedTableRow事件
- (void)onSelectedTableRow:(RCConversationModelType)conversationModelType
         conversationModel:(RCConversationModel *)model
               atIndexPath:(NSIndexPath *)indexPath {
    GHTalkWithDoctor *conversationVC = [[GHTalkWithDoctor alloc]init];
    conversationVC.conversationType = model.conversationType;
    conversationVC.targetId = model.targetId;
    conversationVC.title = @"111";
    [self.navigationController pushViewController:conversationVC animated:YES];
}


@end
